


#define ASSERT assert

#define REGISTER_MESSAGE_HANDLER(msg, handler, className)				\
static MESSAGEHANDLERINFO msg##MHI =									\
{																		\
	reinterpret_cast<const TCHAR*>(&_T(#msg)),							\
	static_cast< MSGFUNCTION >(&className::handler),					\
	0x80000000															\
};																		\
extern "C" CRegisterMessage msg##_##className##RM(_T(#className), &msg##MHI);


///
/// how to automatically register the object inside the .exe, .dll
///
#define REGISTER_COMPONENT_SINGLETON(className)						\
	static TCHAR * className##_Name =_T(#className);				\
	static COMPONENTREGISTERINFO									\
					className##ComponentRegisterInfo =				\
	{																\
		className##_Name,											\
		className::Create											\
	};																\
	extern "C" CRegisterComponent className##RO(&className##ComponentRegisterInfo, true);




#define DELAYEDMESSAGEPRIORITY	0x020000
